<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        require ('./_app/Config.inc.php');
        $conn = new Conn();
        
        try{
            $Query = "SELECT * FROM ws_siteviews_agent WHERE agent_name = :name";
            $Exe = $conn->getConn()->prepare($Query);
            
            $Exe->bindValue(":name", 'Chrome');
            $Exe->execute();
            
            $Chrome = $Exe->fetch(PDO::FETCH_ASSOC);
            
            $Exe->bindValue(":name", 'Safari');
            $Exe->execute();
            
            $Safari = $Exe->fetch(PDO::FETCH_ASSOC);
            
        } catch (PDOException $ex) {
            PHPErro($ex->getCode(), $ex->getMessage(), $ex->getFile(), $ex->getLine());
        }
        if($Chrome):
            //var_dump($Chrome);
            echo "{$Chrome['agent_name']} tem {$Chrome['agent_views']} visita(s)<hr>";
        endif;
        
        if($Safari):
            //var_dump($Safari);
            echo "{$Safari['agent_name']} tem {$Safari['agent_views']} visita(s)<hr>";
        endif;
        ?>
    </body>
</html>
